<template>
	<view>
		<rich-text :nodes="strings"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				strings:""
			};
		},
		onLoad(opt) {
			if(opt.title){
				uni.setNavigationBarTitle({
				  title: opt.title
				})
			}
			this.setHtml(opt.code)
		},
		methods:{
			async setHtml(code){
				const {data:res} = await this.$api('/app/getAgreement','GET',{code})
				console.log(res)
				this.strings = res.data
			}
		}
	}
</script>

<style lang="scss">

</style>
